The present invention relates to a method or and an apparatus for generating a control program from an actuator program which describes operation patterns for an actuator to be controlled, a step program which describes step-wise operation of the actuator, and a logic program which describes logic conditions such as an interlock condition, controlling the actuator based on the generated control program, and displaying operating statuses based on the control program and a status signal from the actuator.
Generally, automatic apparatus such as machine tools, working robots, or the like are operated according to sequences described by control programs in order to reduce personnel required to attend to the apparatus and increase operation efficiency. A control program is executed by a programmable controller, which applies a command signal to the apparatus to be controlled. The apparatus then operates based on the command signal. After the apparatus has effected a required process, it transmits a detected signal from a limit switch or the like to the programmable controller. In response to the detected signal from the apparatus, the programmable controller executes the control program again and gives a next command signal to the apparatus.
Such a control program is usually generated as follows: Based on equipment specifications and timing charts, the system designer draws up a ladder diagram using relay symbols and other symbols, and then inputs the contents of the ladder diagram to the programmable controller, using a programming device of the programmable controller, for example, thereby generating a ladder program.
Drawing up of ladder diagrams requires the system designer to have professional knowledge with respect to sequence control. Modern apparatus to be controlled have a multiplicity of operational functions, and their control is highly complex. Safety control of the apparatus to provide against accidents due to oversights or unexpected accidents is also quite complex. Therefore, even a skilled system designer needs to expend a great deal of time and effort to draw up a ladder diagram.
Generated complex control programs are often required to be modified or corrected as they tend to contain many program errors. Such error-prone control programs also fail to provide desired control functions. When modifying or correcting a control program, it has been customary to directly modify or correct the ladder program in the programmable controller with the programming device, while reviewing a displayed ladder diagram. Accordingly, the original ladder diagram does not exactly reflect modifications or corrections of the ladder program, and hence the ladder diagram and the ladder program in the programmable controller are not identical. It is also very difficult to fully understand the entire program and to make proper program alterations based on the displayed ladder diagram. Problems frequently arise out of the above drawbacks.
In an attempt to eliminate the foregoing shortcomings, there has been proposed, as disclosed in Japanese Laid-Open Patent Publication No. 60(1985)-41102, a sequence control apparatus which can efficiently generate a new control program by linking an existing ladder as a subroutine program. In the proposed apparatus, absolute addresses are allotted to the contacts or the like of a patterned ladder. If the same ladder pattern is to be used, it is necessary to copy the ladder and address the contacts of the ladder. The operator is therefore required to carry out a tedious operation such as filing of a program.
There has also been proposed a method of inputting a timing chart and directly generating a control program from the timing chart. One such method is disclosed in Japanese Laid-Open Patent Publication No. 59(1984)-158408. According to the disclosed method, operation of an object to be controlled is inputted as a timing chart, and supplementary information such as timer commands, which are associated with the time-dependent sequence of the timing chart, is also inputted as a timing chart. Since, however, the operation of the object to be controlled and the supplementary information are inputted as independent timing charts, respectively, the process of inputting them is time-consuming and tedious. If the timing charts are used as specifications of a generated control program, they also cannot easily be understood.
Japanese Laid-Open Patent Publication No. 58(1983)-158704 discloses a method in which operation of an object to be controlled is inputting as a timing chart, and input and output addresses and interlock conditions corresponding to the timing chart are added. The disclosed method is highly complex since a plurality of pieces of supplementary information are added to the timing chart, and the timing chart cannot be easily be understood.
According to another proposed method, logic conditions are directly inputted according to a flowchart (see Japanese Laid-Open Patent Publication No. 60(1985)-164838). However, comments on the logic conditions cannot be indicated with respect to the inputted flowchart. Therefore, difficulty arises when the inputted logic conditions are to be decoded, and hence it is difficult to modify or correct a control program which has been generated. When the control program is altered, the original flowchart does not reflect the alteration of the control program, and does not agree with the control program in the programmable controller.
According to one arrangement, a ladder diagram is displayed on a display monitor to indicate the operation of an object to be controlled. Since only the ladder diagram is displayed, not everyone can immediately recognize which part of the object operates and what operation of the object is indicated, upon viewing the displayed ladder diagram. This scheme is therefore not easy and convenient to use.
One additional drawback is that programs vary according to different types of programmable controllers, and those produced by different types of programmable controllers are not compatible with each other.
Therefore, programmers have to generate different control programs which instruct different types of programmable controllers to do the same operation. Moreover, programmers have to understand commands used by control programs corresponding to different types of programmable controllers. As a consequence, professional programmers who are specifically trained to generate such control programs are required. If programming devices used to aid in producing control programs are dedicated for use with particular programmable controllers of different types, then these programming devices cannot easily and conveniently be used since their operation procedures differ from each other.
Japanese Laid-Open Patent Publication No. 62(1987)-81005 discloses a programming device which has a unified operation procedure for different types of programmable controllers. However, even the disclosed programming device is required to produce different control programs composed of instructions corresponding to the different types of programmable controllers, and the control programs thus produced are not compatible with each other.